#include "loadwords.h"

#include <QTextStream>
#include <QFile>
#include <QDebug>
LoadWords::LoadWords()
{
}

void LoadWords::LoadFormTxt()
{
    QFile file("/home/florina/work/Dictionary/translations/words.txt");
    if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
    {
       qDebug()<<"Can't open file";
        return;
    }
    QTextStream in(&file);
    QString word = in.readLine();
    while(!in.atEnd())
    {
        qDebug()<<"Word:"<<word;
        m_words.append(word);
        word = in.readLine();
    }
}
